 <?php 
	$repository=BO::getCategoryBORepository();
	$id=getFormValue('id');
	$categoryBO = $repository->getCategoryBO($id);
?>
<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">Category Page : <?php echo $categoryBO->getName(); ?></div>
  <div class="panel-body">
		<p>
		
		</p>	

	  	
		<ul class="nav nav-tabs" role="tablist">
		  <li><a href="dispatch.php?target=category-edit&id=<?php echo $categoryBO->getID(); ?>">General</a></li>
		  <li class="active"><a href="dispatch.php?target=category_product-list&id=<?php echo $categoryBO->getID(); ?>">Products</a></li>
		</ul>
		<div class="panel">	
			<div class="panel-body">
				<div class="bs-example">
					<h1>Category : Product List</h1>
						<div class="table-responsive">
							<table class="table table-striped">
							  <thead>
								<tr>
								  <th>Name</th>
								  <th>SKU</th>
								  <th>Price</th>
								  <th>Category</th>
								  <th>Action</th>
								</tr>
							  </thead>
							  <tbody>
								<?php 
									$productBOs =$categoryBO->getProductBOs();  
									foreach($productBOs as $productBO)
									{
								?>
								<tr>
								  <td><?php echo $productBO->getName();?></td>
								  <td><?php echo $productBO->getSKU();?></td>
								  <td><?php echo $productBO->getPrice();?></td>
								  <td><?php echo $productBO->getCategoryName();?></td>
								  <td>
									<div class="btn-group">
									 <a href="dispatch.php?target=product-edit&id=<?php echo $productBO->getID()?>"  class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
									  <a href="dispatch.php?target=product-delete&id=<?php echo $productBO->getID()?>"  class="btn btn-default"><span class="glyphicon glyphicon-trash"></span></a>
									  <div class="btn-group">
										<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
										  More 
										  <span class="caret"></span>
										</button>
										<ul class="dropdown-menu" role="menu">
										  <li><a href="#">offline</a></li>
										  <li><a href="#">copy</a></li>
										</ul>
									  </div>
									</div>
								  </td>	
								</tr>
								<?php	
									}
								?>
							  </tbody>
							</table>
					</div>
					
				</div>
			</div>
		</div>
		
	</div>
	
</div>	
		  
		  
		  